<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The PharFileInfo class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phardata.setstub.html">PharData::setStub</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pharfileinfo.chmod.html">PharFileInfo::chmod</a></div>
 <div class="up"><a href="book.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.pharfileinfo" class="reference">
 <h1 class="title">The PharFileInfo class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP &gt;= 5.3.0, PECL phar &gt;= 1.0.0)</p>
 

  <div class="section" id="pharfileinfo.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The PharFileInfo class provides a high-level interface to the contents
    and attributes of a single file within a phar archive.
   </p>
  </div>
 
 
  <div class="section" id="pharfileinfo.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass"></div>
 

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">PharFileInfo</strong>
     </span>
 
     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.splfileinfo.html" class="classname">SplFileInfo</a>
     </span>
 
     {</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="pharfileinfo.chmod.html" class="methodname">chmod</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$permissions</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.compress.html" class="methodname">compress</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$compression</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="pharfileinfo.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$entry</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.decompress.html" class="methodname">decompress</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.delmetadata.html" class="methodname">delMetadata</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="pharfileinfo.getcrc32.html" class="methodname">getCRC32</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="pharfileinfo.getcompressedsize.html" class="methodname">getCompressedSize</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="pharfileinfo.getmetadata.html" class="methodname">getMetadata</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="pharfileinfo.getpharflags.html" class="methodname">getPharFlags</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.hasmetadata.html" class="methodname">hasMetadata</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.iscrcchecked.html" class="methodname">isCRCChecked</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.iscompressed.html" class="methodname">isCompressed</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$compression_type</code><span class="initializer"> = 9021976</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.iscompressedbzip2.html" class="methodname">isCompressedBZIP2</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.iscompressedgz.html" class="methodname">isCompressedGZ</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.setcompressedbzip2.html" class="methodname">setCompressedBZIP2</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.setcompressedgz.html" class="methodname">setCompressedGZ</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="pharfileinfo.setmetadata.html" class="methodname">setMetadata</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$metadata</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="pharfileinfo.setuncompressed.html" class="methodname">setUncompressed</a></span>
    ( <span class="methodparam">void</span>
   )</div>

 

   }</div>

 
  </div>
 
 </div>
 
 












































































































 
<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="pharfileinfo.chmod.html">PharFileInfo::chmod</a> — Sets file-specific permission bits</li><li><a href="pharfileinfo.compress.html">PharFileInfo::compress</a> — Compresses the current Phar entry with either zlib or bzip2 compression</li><li><a href="pharfileinfo.construct.html">PharFileInfo::__construct</a> — Construct a Phar entry object</li><li><a href="pharfileinfo.decompress.html">PharFileInfo::decompress</a> — Decompresses the current Phar entry within the phar</li><li><a href="pharfileinfo.delmetadata.html">PharFileInfo::delMetadata</a> — Deletes the metadata of the entry</li><li><a href="pharfileinfo.getcrc32.html">PharFileInfo::getCRC32</a> — Returns CRC32 code or throws an exception if CRC has not been verified</li><li><a href="pharfileinfo.getcompressedsize.html">PharFileInfo::getCompressedSize</a> — Returns the actual size of the file (with compression) inside the Phar archive</li><li><a href="pharfileinfo.getmetadata.html">PharFileInfo::getMetadata</a> — Returns file-specific meta-data saved with a file</li><li><a href="pharfileinfo.getpharflags.html">PharFileInfo::getPharFlags</a> — Returns the Phar file entry flags</li><li><a href="pharfileinfo.hasmetadata.html">PharFileInfo::hasMetadata</a> — Returns the metadata of the entry</li><li><a href="pharfileinfo.iscrcchecked.html">PharFileInfo::isCRCChecked</a> — Returns whether file entry has had its CRC verified</li><li><a href="pharfileinfo.iscompressed.html">PharFileInfo::isCompressed</a> — Returns whether the entry is compressed</li><li><a href="pharfileinfo.iscompressedbzip2.html">PharFileInfo::isCompressedBZIP2</a> — Returns whether the entry is compressed using bzip2</li><li><a href="pharfileinfo.iscompressedgz.html">PharFileInfo::isCompressedGZ</a> — Returns whether the entry is compressed using gz</li><li><a href="pharfileinfo.setcompressedbzip2.html">PharFileInfo::setCompressedBZIP2</a> — Compresses the current Phar entry within the phar using Bzip2 compression</li><li><a href="pharfileinfo.setcompressedgz.html">PharFileInfo::setCompressedGZ</a> — Compresses the current Phar entry within the phar using gz compression</li><li><a href="pharfileinfo.setmetadata.html">PharFileInfo::setMetadata</a> — Sets file-specific meta-data saved with a file</li><li><a href="pharfileinfo.setuncompressed.html">PharFileInfo::setUncompressed</a> — Uncompresses the current Phar entry within the phar, if it is compressed</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phardata.setstub.html">PharData::setStub</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pharfileinfo.chmod.html">PharFileInfo::chmod</a></div>
 <div class="up"><a href="book.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
